package com.dd.cloud.user.entity.doctor;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.gitee.sunchenbin.mybatis.actable.annotation.Column;
import com.gitee.sunchenbin.mybatis.actable.annotation.Table;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @author Lx
 * @version 1.0
 * @date 2024/2/2
 */
@Data
@EqualsAndHashCode
@Accessors(chain = true)
@Table(comment = "医生权益表")
public class DoctorEquity implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 医生权益表id
     */
    @TableId(value = "id", type = IdType.AUTO)
    @Column(isKey = true, isAutoIncrement = true)
    private Integer id;

    /**
     * 医生id
     */
    @Column(comment = "医生id")
    private Integer doctorId;

    /**
     * 是否使用首月优惠 1是 0否
     */
    @Column(comment = "是否使用首月优惠 1是 0否")
    private Integer firstMonth;

    /**
     * 有效期
     */
    @Column(comment = "有效期")
    private LocalDateTime expirDate;

    /**
     * 类型 1购买 2赠送
     */
    @Column(comment = "类型 1购买 2赠送")
    private Integer type;

    /**
     * 最后一次使用时间
     */
    @Column(comment = "最后一次使用时间")
    private LocalDateTime lastUseDate;

    /**
     * 慈善订单数累计情况 满足赠送规则后清零
     */
    @Column(comment = "慈善订单数累计情况 满足赠送规则后清零")
    private Integer csOrderNum;

    /**
     * 累计天数
     */
    @Column(comment = "累计天数", defaultValue = "0")
    private Integer accumulateDay;

    /**
     * 累计费用
     */
    @Column(comment = "累计费用", defaultValue = "0")
    private Integer accumulateFee;

    /**
     * 创建时间
     */
    @Column(comment = "创建时间")
    private LocalDateTime createDate;

    /**
     * 手机号
     */
    @TableField(exist = false)
    private String phone;

    /**
     * 名字
     */
    @TableField(exist = false)
    private String name;


    /**
     * 开始时间
     */
    @Column(comment = "开始时间")
    private LocalDateTime startDate;


    /**
     * 体验结束时间
     */
    @Column(comment = "体验结束时间")
    private LocalDateTime endDate;


    /**
     * 体验天数(保存快照)
     */
    @Column(comment = "体验天数(快照)", defaultValue = "0")
    private Integer experienceDays;


    /**
     * 赠送订单天数(快照)
     */
    @Column(comment = "赠送体验天数(快照)", defaultValue = "0")
    private Integer orderDay;



    /**
     * 订单支付数量
     */
    @Column(comment = "订单支付数量")
    private Integer orderNum;


    /**
     * 是否有兑换订单
     */
    @Column(comment = "是否有兑换订单")
    private Integer isReach;


}
